﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WPF项目.Common.Models;

namespace WPF项目.ViewModels
{
    public class AgentMattersViweModel : BindableBase
    {
        public AgentMattersViweModel()
        {
            MemoS = new ObservableCollection<Memo>();
            Create_AgentMatters_Lisr();
            ADDpopup = new DelegateCommand(Add);
        }
        private bool isrightdraweropen;
        /// <summary>
        /// 控制右侧展开
        /// </summary>
        public bool IsRightDrawerOpen
        {
            get { return isrightdraweropen; }
            set { isrightdraweropen = value; RaisePropertyChanged(); }
        }
        /// <summary>
        /// 添加代办
        /// </summary>
        private void Add()
        {
            IsRightDrawerOpen =true;
        }

        public DelegateCommand ADDpopup { get; private set; }


        private ObservableCollection<Memo> Memos;

        public ObservableCollection<Memo> MemoS
        {
            get { return Memos; }
            set { Memos = value; RaisePropertyChanged(); }
        }

        void Create_AgentMatters_Lisr()
        {
                for (int i = 0; i < 30; i++)
                {
                MemoS.Add(new Memo() { Title = "代办" + i, Content = "正在处理。。。" });
                }
        }


    }
}
